from typing import List

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        array = []
        length = len(nums)
        for x in range(length):
            for y in range(length):
                if(x != y):
                    if(nums[y] == (target - nums[x])):
                        array.append(x)
                        array.append(y)
                        return array

    def reverse(self, x: int) -> int:

        MAX = (1 << 30)
        MIN = ((-1) << 31)
        y = 0
        temp = x
        while (x):
            y *= 10;
            if (x > MAX or x < MIN):
                return 0
            x = abs(x)
            y += x % 10;
            x //= 10;

        if(temp > 0) :
            return y
        else:
            return -y

    def isPalindrome(self, x: int) -> bool:

        if x < 0 or (x % 10 == 0 and x != 0):
            return 'false'

        revertedNumber = 0;
        while (x > revertedNumber):
            revertedNumber = revertedNumber * 10 + x % 10;
            x //= 10;

        return x == revertedNumber or x == revertedNumber / 10;

    def romanToInt(self, s) -> int:
        dic = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}
        if len(s) == 1:
            return dic[s]
        for index in range(len(s)):
            print(index)


if __name__ == '__main__':
    dic = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}

    str = "aaa";
    print(dic.get('V'))
    print(max(0,1))
